#ifndef XMODSTREAM
#define XMODSTREAM
#include "XObject.h"
#include "Platform.h"
#include "XModFile.h"
class XM_ENTRY XModStream : public XObject{
public:
	virtual void* GetData() = 0;
	virtual void Read(void* data, int size)=0;
	virtual void Close() = 0;
	virtual bool IsEOF() = 0;
	virtual void Move(int des) = 0;
	virtual void Seek(int pos) = 0;
	virtual int Tell()=0;
};
class XM_ENTRY XModFileStream : public XModStream{
private:
	XModFile m_file;
	BYTE* m_data;
	bool m_loaded;
public:
	XModFileStream();
	XModFileStream(string file);
	~XModFileStream();
	void* GetData();
	void Read(void* data, int size);
	void Close();
	bool IsEOF();
	void Move(int des);
	void Seek(int pos);
	int Tell();
	int Size();
	bool IsLoaded();
};
#endif